package com.group.three.service;

import com.github.pagehelper.PageInfo;
import com.group.three.pojo.Person;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.time.LocalDateTime;
import java.util.List;

@Service
public interface PersonService {
    int register(Long personId, String personName, String personEmail, String personPhone, String personPassword, Integer role, LocalDateTime now);

    Person selectPersonByNameOrEmailOrPhone(String personName,Integer role);

    int updatePerson( Long personId, String personName,  String personEmail, String personPhone,String introduction);

    int updatePassword(String newPassword,Long personId);

    PageInfo<Person> selectListByRole(int page,int size,Integer role);

    int updateStatusByPersonId(Long personId, Integer status);

    int updateImage(String personImage, Long personId);

    int insertAdminRole(Long personId,String personName,String personPassword,Integer role,Integer status);

    PageInfo<Person> selectInformByLikeName(int page,int size,String name,Integer role);

    PageInfo<Person> selectInformByLikeNameNotRole(int page,int size,String name,Integer role);

    PageInfo<Person> selectLogsByRole(int page,int size,Integer role,String name);
    PageInfo<Person> selectLogsByNotRole(int page,int size,Integer role,String name);

    PageInfo<Person> selectListByNotRole(int page,int size,Integer role);

    Person selectInformById(Long personId);

}
